package com.sansui.Untls;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.Reader;
import java.io.StringReader;


public class Untls {

	public static InputStream getStringInputStream(String s) { 
	    if (s != null && !s.equals("")) { 
	        try { 

	            ByteArrayInputStream stringInputStream = new ByteArrayInputStream( 
	                    s.getBytes()); 
	            return stringInputStream; 
	        } catch (Exception e) { 

	            e.printStackTrace(); 
	        } 
	    } 
	    return null; 
	} 
	public static Reader getStringReader(String s) { 
	    if (s != null && !s.equals("")) { 
	        try { 

	            StringReader stringReader = new StringReader(s); 
	            return stringReader; 
	        } catch (Exception e) { 

	            e.printStackTrace(); 
	        } 
	    } 
	    return null; 
	} 

}
